import request from '@/utils/request'
export const depListAPI = () => {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
/**
 * 根据id删除部门
 * **/
export function DelDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
// 获取负责人列表
export const getManagerAPI = () => {
  return request({
    method: 'get',
    url: `/sys/user/simple`
  })
}
// 添加新增部门

export const addDeptAPI = (deptForm) => {
  return request({
    method: 'post',
    url: `/company/department`,
    data: deptForm
  })
}
export const getDeptDetailAPI = (deptId) => {
  return request({
    method: 'get',
    url: `/company/department/${deptId}`
  })
}
// 编辑部门
export const editDeptDetailAPI = (deptForm) => {
  return request({
    method: 'put',
    url: `/company/department/${deptForm.id}`,
    data: deptForm
  })
}
